import './lib'

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
import { enableProdMode } from '@angular/core'
import { environment } from './environments/environment'
import { AppModule } from './app/app.module'
import {appInit} from './app/app.init'

if (environment.production) {
  enableProdMode()
}

appInit.initApp().then(()=>{
  //$.ajax 全局添加X-token
  $.ajaxSetup({
    headers: {
      'X-Token': localStorage.getItem('token') || ''
    }
  })
  platformBrowserDynamic().bootstrapModule(AppModule)
})
